{include file="header.html"}

<div class="page-header">
	<h6>
		商品二维码列表
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			商品二维码列表
		</small>
		<a href="?app=goods&act=qrcode_out&id={$id}&keyword={$keyword}&shop_id={$shop_id}" target="_blank"style="float:right;">导出二维码</a>
	</h6>
</div><!-- /.page-header --> 
<div style="margin-top:30px;">
	<form action="?" method="get">
	<div class="search">
	<input type="hidden" name="app" id="app" value="goods" />
	<input type="hidden" name="act" id="act" value="goods_qrcode" />
	<span> ID : </span><input type="text" name="id" id="id" value="{$id}" /> 
	<span> 关键词 : </span><input type="text" name="keyword" id="keyword" value="{$keyword}" /> 
	<select name="shop_id" id="shop_id" class=" form-control "  data-live-search="true" style="line-heght:30px;display:inline-block;width:150px;">
	<option value=""> 门店 </option>
	{foreach from=$shops  item=shop}
	<option value="{$shop->id}" {if $shop->id == $shop_id}selected{/if}>{$shop->name}</option>
	{/foreach}
	</select>
	<input type="submit" class="btn" value="搜 索"  /> 
	<div class="clear"></div>
	</div>
	</form>
  </div>

<table id="simple-table" class="table table-striped table-bordered table-hover">
	<thead>
		<tr>
			<th>ID</th>
			<th>图片</th>
			<th>名称</th>
			<th>货号</th>
			<th>二维码</th>
			<th>状态</th>
			<th>添加时间</th>
			<th>操作</th>
		</tr>
	</thead>

	<tbody>
		{if $shop_id > 0}
		{foreach from=$rs item=row name=row}
		<tr>
			<td>{$row.id}</td>
			<td style="text-align:left;"><img src="{if $row.default_pic !== ''}{$row.default_pic}{else}/images/nopic.png{/if}" width="100" /></td>
			<td style="text-align:left;">{$row.name|truncate:20}</td>
			<td style="text-align:left;">{$row.huohao}</td>
			<td style="text-align:left;"><img src="?app=goods&act=qrcode&url={$row.url}" style="width:130px"></td>
			<td style="text-align:left;">{if $row.status == 1}正常{else}下架{/if}</td>
			<td style="text-align:left;">{$row.add_time|date_format:"%Y-%m-%d"}</td>
			<td>
				<a href="?app=goods&act=edit&goods_id={$row.id}">
					<button class="btn btn-xs btn-info">
					<i class="ace-icon fa fa-pencil bigger-120"></i>
				</button>
				</a>
				<a href="?app=goods&act=delete&goods_id={$row.id}" class="delete">
					<button class="btn btn-xs btn-danger">
					<i class="ace-icon fa fa-trash-o bigger-120"></i>
				</button>
				</a>
			</td>
		</tr>
		{foreachelse}
		<tr bgcolor="white"><td colspan="13" height="50">暂无记录</td></tr>
		{/foreach}	
		{/if}
	</tbody>
</table>
	<div class="mypage" style="text-align:right">
			共 {$page.num_records} 个记录  {$page.current_page} / {$page.num_pages} 页  {$page.first_page} {$page.prev} {$page.nav} {$page.next} {$page.last_page}
	</div>
{include file="footer.html"}
<script type="text/javascript">
</script>
